package com.kun.sync.processor;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Arrays;

/**
 * 转化逻辑
 * 
 * @author zjkorder (2018/1/30 9:59)
 */
public abstract class ConvertProcessor {

	public abstract ParamsType convert(ResultSet resultSet) throws SQLException;

	public static class ParamsType {

		Object[] params;

		int[] sqlType;

		public ParamsType(Object[] params, int[] sqlType) {
			this.params = params;
			this.sqlType = sqlType;
		}

		public Object[] getParams() {
			return params;
		}

		public void setParams(Object[] params) {
			this.params = params;
		}

		public int[] getSqlType() {
			return sqlType;
		}

		public void setSqlType(int[] sqlType) {
			this.sqlType = sqlType;
		}

		@Override
		public String toString() {
			return "ParamsType{" + "params=" + Arrays.toString(params) + ", sqlType=" + Arrays.toString(sqlType) + '}';
		}
	}
}
